<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>租赁项目资产资金回款记录列表</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox">
                    <div class="label">名称</div>
                    <div class="field">
                        <input name="" id="" type="text" class="ui-textbox" value="">
                    </div>
                </div>

                <div class="clearFix"></div>
                <div class="btnsBox">
                    <span id="searchBtn" class="sq-button sq-button-round">查询</span>
                    <span id="clearBtn" class="sq-button sq-button-round">清空</span>
                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
            </div>
        </form>
    </div>
    <div id="ligergrid1" class="sq-grid"></div>
</div>

<script type="text/javascript">
    var grid = null,callback=null;
    $(function () {
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/capital/capAdvBackFundLog/initList.do',
            method: 'get',
            columns: [
        {display: '融资机构ID', name: 'fncInsId', minWidth: 120, align: 'left', enabledSort: false},              
        {display: '融资机构名称', name: 'fundRasInsNm', minWidth: 100, align: 'left', enabledSort: false},
        {display: '再融资方案ID', name: 'fncScmId', minWidth: 120, align: 'left', enabledSort: false},
		{display: '再融资方案名称', name: 'fncScmNm', minWidth: 100, align: 'left', enabledSort: false},
		{display: '融资期限', name: 'payPlanPd', minWidth: 100, align: 'left', enabledSort: false},
		{display: '还款类别', name: 'repyTpNm', minWidth: 100, align: 'left', enabledSort: false},
		{display: '资产包ID', name: 'assPackId', minWidth: 100, align: 'left', enabledSort: false},
		{display: '资产包名称', name: 'assPackNm', minWidth: 160, align: 'left', enabledSort: false},
		{display: '租赁人ID', name: 'cstId', minWidth: 100, align: 'left', enabledSort: false},
		{display: '租赁人', name: 'cstNm', minWidth: 100, align: 'left', enabledSort: false},
		
		{display: '项目状态', name: 'fncPrjStcdNm', minWidth: 100, align: 'left', enabledSort: false},
		{display: '资产包融资金额', name: 'acFiAmt', minWidth: 100, align: 'left', enabledSort: false,
			 render: function (rowdata, index, value) {
                 return '&yen;' + FormatMoney(rowdata.acFiAmt / 100);
             }		
		},
		{display: '合同编号', name: 'contDetailNm', minWidth: 100, align: 'left', enabledSort: false},
		{display: '支付表编号', name: 'paySchNo', minWidth: 190, align: 'left', enabledSort: false,
			  render:function(rowdata,rowindex,value){
                  if(value){
                      var h;
                      h='<a href="javascript:toDetailed(';
                      h+="'"+rowdata.paySchId+"'";
                      h+=",'"+rowdata.paySchNo+"'";
                      h+=')">'+rowdata.paySchNo+'</a>'
                      return h;
                  }
              }
		},
		{display: '资金回款 |逾期条目', name: 'payPlanLi', minWidth: 100, align: 'left', enabledSort: false},
		{display: '垫款条目', name: 'paySchCount', minWidth: 100, align: 'left', enabledSort: false},
		],	
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: true,
            rownumbers: true,
            allowUnSelectRow: true,
            alternatingRow: false
        });
        grid.setHeight(100);

        $("#searchBar").ligerForm();

        $("#pageloading").hide();

        /* 查询 */
        $("#searchBtn").click(function (event) {
            var form = liger.get("searchBar");
            var data = form.getData();
            for (name in data) {
                grid.setParm(name, data[name]);
            }
            grid.reload();
        });

        /* 清空 */
        $("#clearBtn").click(function (event) {
            clearLigerForm("searchBar");
        });
        
        callback = function () {
            grid.reload();
        };
    }); 
    
    
    //租赁人还款记录、租赁项目资金回款记录
	function toDetailed(paySchId,paySchNo){
		if(StringUtils.isEmpty(paySchId)||StringUtils.isEmpty(paySchNo))return;
		   var params = "paySchId=" + paySchId+"&paySchNo="+paySchNo;
		Add_navTab('capAdvBackFundLog_'+paySchId,'资金回款详情','<%=path%>/capital/capAdvBackFundLog/toCapAvdBackLogModifyPage.do?'+params);
    }

	
</script>

</body>
</html>
